{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>{{ title|title }}</title>

    <!-- Bootstrap core CSS -->
    <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">

    <!-- Custom styles for this template -->
    {% block css %} {% endblock %}

</head>

<body>

<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
    <div class="container">
        <a class="navbar-brand" href="{% url 'index' %}">Store</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
                aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'products:index' %}">Каталог <i class="fas fa-shopping-bag"></i> </a>
                </li>
              {% if user.is_authenticated %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'users:profile' %}">{{ user.username }}
                        <i class="fas fa-user-circle"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'users:logout' %}">Выйти <i class="fas fa-sign-out-alt"></i></a>
                </li>
              {% else %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'users:login' %}">Войти <i class="fas fa-sign-in-alt"></i></a>
                </li>
              {% endif %}
            </ul>
        </div>
    </div>
</nav>

<!-- Page Content -->
{% block content %} {% endblock %}

<!-- Footer -->
{% block footer %} {% endblock %}

<!-- Bootstrap core JavaScript -->
<script src="{% static '/vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static '/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>

<!-- FontAwesome script -->
<script src="{% static '/vendor/fontawesome/fontawesome-icons.js' %}" crossorigin="anonymous"></script>

</body>

</html>
